package com.glasses.manage.core.ezpage;

import com.glasses.manage.core.entity.PageBean;
import com.glasses.manage.core.entity.PageParam;

public class PageUtils {

    public static PageParam convert(EzPageParam param) {
        return new PageParam(param.getPage(), param.getRows(), param.getSort(), param.getOrder());
    }

    public static <T> EzPage<T> convertPageBean(PageBean<T> pageBean) {
        return new EzPage<T>(pageBean.getTotalCount(), pageBean.getRecordList());
    }
}